<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改合作商')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-partner-edit" th:object="${merchantInstall}">

        <input name="merchantId" th:field="*{merchantId}" type="hidden">

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">提现手续费(%)：</label>
            <div class="col-sm-8">
                <input name="txBrokerage" th:field="*{txBrokerage}" class="form-control" type="text" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">提现允许最小金额：</label>
            <div class="col-sm-8">
                <input name="txMinPermit" th:field="*{txMinPermit}" class="form-control" type="text" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">账单明细功能：</label>
            <div class="col-sm-8">
                <select name="deatilAbility" class="form-control m-b"
                        th:with="type=${@dict.getType('sys_merchants_deatil_ability')}" required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{deatilAbility}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">商户提现功能：</label>
            <div class="col-sm-8">
                <select name="cashoutAbility" class="form-control m-b"
                        th:with="type=${@dict.getType('sys_merchants_cashout_ability')}" required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{cashoutAbility}"></option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">冻结金额：</label>
            <div class="col-sm-8">
                <input name="frozenMoney" th:field="*{frozenMoney}" class="form-control" type="text" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">可提现金额：</label>
            <div class="col-sm-8">
                <input name="cashoutMoney" th:field="*{cashoutMoney}" class="form-control" type="text" required>
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/merchant";
    $("#form-partner-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/putUpBase", $('#form-partner-edit').serialize());
        }
    }
</script>
</body>
</html>